{% extends "bootstrap/base.html" %}

{% block title %}{{ user.name }}'s Watchlist{% endblock %}


{% block head %}
{{ super() }}
    <link rel="icon" href="{{ url_for('static', filename='icon.ico') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" type="text/css">
{% endblock %}


    {% block navbar %}
        {% block head_img %}
            <h2>
                <img alt="Avatar" class="avatar" src="{{ url_for('static', filename='images/avatar.png') }}">
                {{ user.name }}'s Watchlist
            </h2>
        {% endblock%}
    <div class="navbar navbar-default" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            <a class="navbar-brand" href="{{ url_for('index') }}">Watchlist</a>            </div>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="{{ url_for('index') }}">Home</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                    {% if current_user.is_authenticated %}
                        <li><a href="{{ url_for('setting') }}">Settings</a></li>
                        <li><a href="{{ url_for('logout') }}">Logout</a></li>
                    {% else %}
                        <li><a href="{{ url_for('login') }}">Login</a></li>
                    {% endif %}
            </ul>

        </div>
    </div>

<!--    <div class="navbar navbar-inverse" role="navigation">-->
<!--        <div class="container">-->
<!--            <div class="navbar-collapse collapse">-->
<!--                <ul class="nav navbar-nav">-->
<!--                    <li><a href="{{ url_for('index') }}">Home</a></li>-->
<!--                    {% if current_user.is_authenticated %}&ndash;&gt;-->
<!--                        <li><a href="{{ url_for('setting') }}">Settings</a></li>-->
<!--                        <li><a href="{{ url_for('logout') }}">Logout</a></li>-->
<!--                    {% else %}-->
<!--                        <li><a href="{{ url_for('login') }}">Login</a></li>-->
<!--                    {% endif %}-->
<!--                </ul>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
    {% endblock %}


    {% block content %}
        <div class="margins">
            {% for message in get_flashed_messages() %}
                <div class="alert alert-warning">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ message }}
                </div>
            {% endfor %}
            {% block page_content %}{% endblock %}
            {% block paginate %}{% endblock %}

            <footer>
                <small>&copy; 2018 <a href="http://helloflask.com/tutorial">HelloFlask</a></small>
            </footer>
        </div>
    {% endblock %}


{% block scripts %}
{{ super() }}
{{ moment.include_moment() }}
{{ moment.locale('Zh-cn') }}
{% endblock %}

